<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head th:include="include/css-head :: css-head">
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title>答题结果</title>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/css/loading/style.css" rel="stylesheet">
    <style type="text/css">
        hr {
            margin-top: 15px;
        }

        html, body {
            width: 100%;
        }

    </style>
</head>
<body style="background:url('/static/images/wx_bj/index_bj.jpg'); background-size: 100% 100%;font-size: 14px;height: 100vh">

<div id="loading" style="display: none;position: absolute;top: 0;left: 0;width: 100%;height: 100%;background-color: rgba(255,255,255,.5);text-align: center;line-height: 60;">
    <div class="sp sp-circle" style="display: inline-block;top: 50%;left: 50%"></div>
</div>
<div style="position: fixed;
    bottom: 2px;
    right: 2px;
    width: 65px;
    height: 65px;background: url('/static/images/reHomeIco.png') no-repeat;
    background-size: 100% 100%;
    " onclick="reHome()">
</div>
<div style="width: 100%;height: 100%;overflow: auto">
    <div style="height: 30%;width: 100%"></div>
<div id="form1" style=" width:90%; margin:2px auto;font-size: 20px;">
    <form action="postExam" method="post" name="examform">
        <div>
            <div>
                <div>
                    <hr style=" height:1px;">
                </div>
                <div style="text-align: center;margin-bottom: 15px;font-weight: bold"><span
                        th:text="${session.answerType}==0?'模拟':''"></span>答题结果
                </div>
                <input id="id" th:value="${result.data.id}" type="hidden">
                <input id="openId" th:value="${result.data.open_id}" type="hidden">
                <div style="margin-bottom: 5px;">姓名：<span th:text="${result.data.name}"></span></div>
                <div style="margin-bottom: 5px;">电话：<span th:text="${result.data.phone}"></span></div>
                <div style="margin-bottom: 5px;">所属单位：<span th:text="${result.data.company}"></span></div>
                <div style="margin-bottom: 5px;">本次答题用时：<span th:text="${result.data.userTime}"></span></div>
                <div style="margin-bottom: 5px;">本次得分：<span th:text="${result.data.curscore}"></span></div>
                <div th:if="${session.answerType}!=0" style="margin-bottom: 5px;">最高得分：<span th:text="${result.data.maxscore}"></span></div>
            </div>
        </div>
        <div>
            <hr style=" height:1px;">
        </div>
        <div>
            <a href="#" id="eqs_btn"  style="color: white;font-weight: bold;background-color: red;border-radius: 10px">&nbsp;&nbsp;查看我答错的题↓&nbsp;&nbsp;</a>
            <div id="eqs" style="display: none;background-color: rgba(255,255,255,.8);padding: 0 10px;border-radius: 5px">
                <p style="font-size: 14px;color: red">注：未作答的题目不会收录</p>
                <div th:each="qs,index:${errorMap}">
                    <p th:text="Q.+${qs.key.questionname}"></p>
                    <p th:if="${qs.key.optionA}!=''" th:text="A.+${qs.key.optionA}"></p>
                    <p th:if="${qs.key.optionB}!=''" th:text="B.+${qs.key.optionB}"></p>
                    <p th:if="${qs.key.optionC}!=''" th:text="C.+${qs.key.optionC}"></p>
                    <p th:if="${qs.key.optionD}!=''" th:text="D.+${qs.key.optionD}"></p>
                    <p th:if="${qs.key.optionE}!=''" th:text="E.+${qs.key.optionE}"></p>
                    <p th:if="${qs.key.optionF}!=''" th:text="F.+${qs.key.optionF}"></p>
                    <p th:if="${qs.key.optionG}!=''" th:text="G.+${qs.key.optionG}"></p>
                    <p th:if="${qs.key.optionH}!=''" th:text="H.+${qs.key.optionH}"></p>

                    <p>您的答案: <span th:text="${qs.value}"></span></p>
                    <p>正确答案: <span th:text="${qs.key.answer}"></span></p>
                    <hr style="background-color:#6a6a6a;height: 2px">
                </div>
                <p style="font-size: 14px;color: red">没有错题了...</p>
            </div>
        </div>
    </form>
</div>
</div>
<script src="/static/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/static/bower_components/jquery/dist/jquery.cookie.js"></script>
<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/static/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="/static/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript">
    $(function () {
        let h = window.innerHeight
            || document.documentElement.clientHeight
            || document.body.clientHeight;
        $("body").height(h + 'px');
    })

    let openId = $("#openId").val();
    $("#eqs_btn").click(function () {
        $("#eqs").fadeToggle('fast');
    })


    function reHome() {
        $("#loading").show();
        window.location.href = "/goWxIndex?id=" + openId;
    }

    pushHistory();
    function pushHistory() {
        history.pushState('', '', '/goWxIndex?id='+openId)
    }

</script>
</body>
</html>
